/**
 * Created by Administrator on 2017/11/16 0016.
 */
define(function (require, exports, module) {
    exports.ready = function () {
        require.async('$', function () {
            $(function () {
                //$('.load').hide();
                var accountId = $('#accountId').val();
                if (accountId == 60 || accountId == 17) {
                    fm.confirm('<p class="font-16 font-red">提示</p ><p class="font-gray6 margint-10">因学校相关规定与食堂自身限制，暂时无法配送教学区与金沙港生活区，敬请谅解</p >', function (callback) {
                        if (callback == 1) {
                            fm.closeLayer();
                        } else {

                        }
                    }, 'border-top: 4px solid #00a5f3;min-width: 64%;')
                }
                $('.entrance').click(function () {
                    var data = {};
                    data.res_id = {BEESCRM: $res_id};
                    $.ajax({
                        url: "/base/restaurantstyy/entrance/res_id/" + data.res_id,
                        data: 'data',
                        dataType: 'json',
                        type: 'POST',
                        async: true,
                        success: function (data) {
                            if (data.status == 'S') {
                                location.href = data.url;
                            } else {
                                fm.alert(data.message);
                                return false;
                            }
                        }
                    })
                })

            /*    $(window).load(function(){

                    FastClick.attach(document.body);
                });*/
            });
        });
    };
});